﻿@model IEnumerable<MIS4200_tt240016.Models.Student>

@{
    ViewBag.Title = "Student Index";
}

<h2>Student Index <span class="glyphicon glyphicon-user"></span></h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table table-bordered">
    <tr class="success">
        <th>
            Student First Name
        </th>
        <th>
            Student Last Name
        </th>
        <th>
            Student Email
        </th>
        <th>
            Student Phone
        </th>
        <th>
            Course ID
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr class="info">
        <td>
            @Html.DisplayFor(modelItem => item.studentFirst)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.studentLast)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.studentEmail)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.studentPhone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.courseID)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.studentID }) |
            @Html.ActionLink("Details", "Details", new { id=item.studentID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.studentID })
        </td>
    </tr>
}

</table>
